package com.seeTools.next.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: seeTools
 * @Date: 2024/5/17  9:46
 * @Version 1.0
 * 优惠券途径
 */
@Getter
@AllArgsConstructor
public enum CouponRouteEnum {

    PC("PC", "后台发送"),

    ;


    /**
     * 途径
     */
    private final String route;

    /**
     * 途径名称
     */
    private final String name;


    /**
     * 获取指定枚举
     *
     * @param route
     * @return
     */
    public static CouponRouteEnum getEnum(String route) {
        for (CouponRouteEnum item : CouponRouteEnum.values()) {
            if (route.equals(item.getRoute())) {
                return item;
            }
        }
        return null;
    }
}
